using System.Collections;
using Core.GameObjects.Items;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace Core.GameObjects.Entities
{
    public class Player : Entity
    {
        public Hashtable WornItems { get; set; }

        public Item Body;
        public Item Face;
        public Item Hair;
        public Item TempWorn;

        public Player(int ID, string Name) : base(ID, Name)
        {
            WornItems = new Hashtable();            
        }

        public void AddItems()
        {
            _ChildObjects.Add(Body);
            _ChildObjects.Add(TempWorn);
            _ChildObjects.Add(Face);
            _ChildObjects.Add(Hair);
        }

        public override void Draw(SpriteBatch spriteBatch, Point destPoint)
        {
            //Rectangle destRectangle = new Rectangle(destPoint.X, destPoint.Y, _TileSet.TileWidth, _TileSet.TileHeight);
            //Draw Characters Visible attributes/items in proper order
            foreach(Item i in _ChildObjects)
            {
                if (i != null)
                {
                    i.Draw(spriteBatch, destPoint);
                }
            }
            //Body.Draw(spriteBatch, destRectangle);
            //TempWorn.Draw(spriteBatch, destRectangle);
            //Face.Draw(spriteBatch, destRectangle);
            //Hair.Draw(spriteBatch, destRectangle);
            
        }
    }
}
